package com.wxb.hello.auth.beans;

/**
 * describe: 统一全局响应。
 *
 * @author : 王校兵
 * @version : v1.0
 * @time : 2017-9-8
 */
public enum OMCode {

    SUCCESS("0000", "success"), //success为调用方法成功
    FAIL("-9999", "call failed"), //fail为调用方法失败
    ERROR_LOGIN("-7950", "登录失败"),
    ERROR_USER_ISEXIST("-7951", "帐号已存在"),
    ERROR_USER_EMPTY("-7952", "帐号不存在"),
    ERROR_USER_PARAMEMPTY("-7953", "帐号属性参数为空"),
    ERROR_USER_ACCOUNT_LOCKED("-7954", "帐号已锁定"),
    ERROR_USER_UNKNOWN_USERNAME("-7955", "登录名不存在"),
    ERROR_USER_BAD_CREDENTIALS("-7956", "密码验证失败"),
    ERROR_USER_SERVICE("-7957", "登录系统服务异常"),
    ERROR_USER_SESSION("-7958", "登录SESSION失效"),
    ERROR_USER_ROLE_EMPTY("-7959", "帐号角色为空"),
    ERROR_PARAM("-7960", "请求参数有误"),
    ERROR_REPORT("-7961", "请求报表服务错误"),


    ORDER_NOT_FOUND("-7964", "订单不存在"),
    ORDER_ID_MISSING("-7965", "未指定订单ID"),

    USER_UPDATE_FAIL("-7966", "更新用户信息失败"),
    USER_TEL_NOT_EXIST("-7767", "用户没有添加手机号"),
    CALL_CHARGE_ERROR("-7768", "调用计费平台失败");

    private String code;
    private String msg;

    OMCode(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String code() {
        return code;
    }

    public String msg() {
        return msg;
    }

}
